{% extends 'blogmanage/layoutA.html' %}
{% import 'blogobj/helper.html' as helper %}
{% block blog_header %}
<section class="all_page_slider_bg">
        <div class="container">
            <div class="row">
                <div class="col-xs-12 ">
                    <div class="normal_service_text all_page_slider_text">
                        <h2>博客</h2>
                        <ol class="breadcrumb">
                            <li><a href="{{ url_for('blog.blog_index') }}">首页</a><span></span></li>
                            <li class="active"><a href="#">管理中心</a></li>
                        </ol>
                    </div>
                </div><!-- column End -->
            </div><!-- row End -->
        </div><!-- container End -->
    </section>
{% endblock %}

{% block main_content %}
    <div class="row">
        <div class="col-lg-8">
            <div class="panel">
                <div class="panel-heading">
                    <h3>消息列表</h3>
                </div>
                <div class="panel-body">
                <table class="table table-striped custom-table table-hover">
                    <thead>
                    <tr>
                        <th><i class="fa fa-bookmark-o"></i> 姓名</th>
                        <th class="hidden-xs"><i class="fa fa-building-o"></i> 邮箱</th>
                        <th><i class="fa fa-bar-chart-o"></i> 内容</th>
                        <th><i class=" fa fa-edit"></i> 提交时间</th>
                        <th class="hidden-xs"><i class="fa fa-cogs"></i> 操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {% for message in messages.items %}

                    <tr>
                        <td><a href="#">{{ message.name }}</a></td>
                        <td class="hidden-xs">{{ message.email }}</td>
                        <td>{{ message.body }}</td>
                        <td><span class="text-xs">{{ message.releasetime.strftime('%Y-%m-%d %H:%M:%S') }}</span></td>
                        <td class="">
                            <a href="{{ url_for('.msg_del', id=message.id) }}"  id="del" class="btn btn-danger btn-xs"><i class="fa fa-trash-o "></i></a>
                        </td>
                    </tr>

                    {% endfor %}
                    </tbody>
                </table>
                </div>
            {{ helper.render_admin_page(messages, '.message_list') }}
            </div>
        </div>
    </div>
{% endblock %}